<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.atguigu.bean.User" %><%--
  Created by IntelliJ IDEA.
  User: zsh
  Date: 2020/9/11
  Time: 18:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    User user = new User(1001, "admin", "123");
%>
<%
    User user1 = new User(1001, "admin", "123");
%>
<c:if test="${not empty sessionScope.user}" var="flag">
    欢迎，${sessionScope.user.uername}
</c:if>
<c:if test="${!pageScope.flag}">
    <a href="">登入</a>
    <a href="">注册</a>
</c:if>
<c:if test="${empty sessionScope.user}">
    <a href="">登录</a>
    <a href="">注册</a>
</c:if>
<c:if test="${not empty sessionScope.user}" var="flag1">
    欢迎你,${sessionScope.user.username}
</c:if>
<c:if test="${!pageScope.flag1}">
    <a href="">登入</a>
    <a href="">注册</a>
</c:if>
<br>
<c:if test="${empty sessionScope.uesr}">
    <a href="">登录</a>
    <a href="">注册</a>
</c:if>


</body>
</html>
